<%layout("/common/layout.html"){%>
<div class="am-g am-g-fixed blog-g-fixed">

    <div class="am-u-md-8">

        <ol class="am-breadcrumb">
            <li><a href="#" class="am-icon-home">首页</a></li>
            <li><a href="#">${book.category.name}</a></li>
            <li class="am-active">${book.name}</li>
        </ol>

        <article class="blog-main">

            <div class="am-g blog-content">
                <div class="am-u-lg-5">
                    <p><img src="${book.img}" rel="书的图片"></p>
                </div>

                <div class="am-u-lg-6 am-u-lg-offset-1">
                    <h1>${book.name}</h1>
                    <dl>
                        <dt>
                            作者:
                        </dt>
                        <dd>
                            ${book.author!}
                        </dd>
                        <dt>
                            出版社:
                        </dt>
                        <dd>
                            ${book.publish!}
                        </dd>
                    </dl>
                </div>

                <div class="am-lg">
                    <p>${book.content!}</p>
                </div>


                <%if(book.type==0){%>
                <div class="am-lg am-lg-text-center">
                    <p><span class="am-badge am-badge-primary am-text-xl">出售</span></p>

                    <p class="book-text-info"><span class="am-icon-clock-o am-icon-sm"> </span> ${book.time} <span
                            class="am-icon-dollar am-icon-sm"> </span> 10块</p>

                    <p class="book-text-address"><span class="am-icon-map-marker am-icon-sm"> 地址</span> 海棠二区324</p>

                    <p class="book-text-address"><span class="am-icon-phone am-icon-sm"> 电话</span> 13072294007</p>
                </div>
                <%}else if(book.type==1){%>
                <div class="am-lg am-lg-text-center">
                    <p><span class="am-badge am-badge-secondary am-text-xl">求购</span></p>

                    <p class="book-text-info"><span class="am-icon-clock-o am-icon-sm"> </span> ${book.time} </p>

                    <p class="book-text-address"><span class="am-icon-phone am-icon-sm"> 电话</span> 13072294007</p>
                </div>
                <%}else{%>
                <div class="am-lg am-lg-text-center">
                    <p><span class="am-badge am-badge-success am-text-xl">赠送</span></p>

                    <p class="book-text-info"><span class="am-icon-clock-o am-icon-sm"> </span> ${book.time} </p>

                    <p><span class="am-icon-comment am-icon-sm"> 条件:</span></p>

                    <p>${book.method!}</p>

                    <p class="book-text-address"><span class="am-icon-map-marker am-icon-sm"> 地址</span> 海棠二区324</p>

                    <p class="book-text-address"><span class="am-icon-phone am-icon-sm"> 电话</span> 13072294007</p>
                </div>
                <%}%>

            </div>
        </article>

        <%for(post in page.list!){%>

        <article class="am-comment">
            <a href="">
                <img src="${post.user.head}" class="am-comment-avatar" alt="我本来是头像"/>
            </a>

            <div class="am-comment-main">
                <header class="am-comment-hd">
                    <div class="am-comment-meta">
                        <a href="#link-to-user" class="am-comment-author">${post.user.name}</a>
                        评论于
                        <time datetime=""> ${post.time}</time>
                    </div>
                </header>

                <div class="am-comment-bd">${post.content}</div>
            </div>
        </article>

        <%}%>


    </div>

    <%include("/common/right.html"){}%>

</div>

<%}%>
